<?php

namespace common\models\order;

use common\models\BaseModel;

/**
 * Desc 订单管理模型
 */
class OrderRefundModel extends BaseModel
{

    /** 状态: 待审核 */
    const STATE_WAIT_AUDIT = 1;
    /** 状态: 退款成功 */
    const STATE_SUCCESS = 2;
    /** 状态: 拒绝退款 */
    const STATE_REFUSE = 3;
    /** 状态: 用户取消 */
    const STATE_CANCEL = 4;

    // 退款状态
    public static $state = [
        self::STATE_WAIT_AUDIT => '待审核',
        self::STATE_SUCCESS => '退款成功',
        self::STATE_REFUSE => '拒绝退款',
        self::STATE_CANCEL => '用户取消',
    ];

    /** 类型: 仅退款 */
    const TYPE_REFUND = 1;
    /** 类型: 退货退款 */
    const TYPE_RETURN = 2;
    // 类型
    public static $type = [
        self::TYPE_REFUND => '仅退款',
        self::TYPE_RETURN => '退货退款',
    ];


    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%order_refund}}';
    }
}
